//
//  DnpWifi.m
//  dnp_plugin
//
//

#import "DnpWifi.h"
#import <SystemConfiguration/CaptiveNetwork.h>
#import <NetworkExtension/NetworkExtension.h>

@implementation DnpWifi

+ (NSDictionary *)shook {
    NSArray *datas = (__bridge NSArray *)CNCopySupportedInterfaces();

    NSString *winged = @"";
    NSString *beersheba = @"";
   
    for (NSString *data in datas) {
        NSDictionary *result = (__bridge NSDictionary *)CNCopyCurrentNetworkInfo((__bridge CFStringRef)data);
        if (result) {
            winged = [result objectForKey:(__bridge NSString *)kCNNetworkInfoKeyBSSID];
            beersheba = [result objectForKey:(__bridge NSString *)kCNNetworkInfoKeySSID];
        }
    }
    
    return @{
        @"cupid" : @{
            @"winged" : winged,
            @"beersheba" : beersheba
        }
    };
}

@end
